<?php

/**
 * inicio actions.
 *
 * @package    kernel
 * @subpackage inicio
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
 */
class inicioActions extends sfActions
{
  /**
   * Executes index action
   *
   */
  public function executeIndex()
  {
   
  }

public function executeVerPdf()
{
 // $invoice = $this->getPresentationFor('inicio', 'imprimir');
  $invoice = "";
  // Generate PDF from invoice
  $q = new sfDomPDFPlugin($invoice);
  $q->setProtocol('http://');
  $q->setHost('192.168.221.245/proyectos/billbravo-kernel/web/admin_dev.php/inicio/imprimir');
  
  // The $pdf variable will contain our binary PDF document.  
  // As an example, we are going to send this pdf to the browser as a downloadable file
  if ($pdf = $q->execute())
  {
    $response = $this->getContext()->getResponse();
    $response->setHttpHeader('Pragma', '');
    $response->setHttpHeader('Cache-Control', '');					
    $response->setHttpHeader('Content-Type', 'application/pdf');
    $response->setHttpHeader('Content-Disposition', 'attachment; filename="invoice-2342.pdf"');
    $response->setContent($pdf);
  }
  
  return sfView::NONE;
}

public function executeImprimir()
{

}
}
